﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_ascx_SearchTemplateTest_SearchTempTest : System.Web.UI.UserControl,ISearchRunType
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    #region ISearchRunType 成员

    public string GetSearchString(ConfigColumns cCol, string Value)
    {        
        string sql="2=2";
        if (!string.IsNullOrEmpty(Request.Form[cCol.ColumnName+"_SearchShow$aaa"]))
        {
            sql += " and (title like '%" + Request.Form[cCol.ColumnName+"_SearchShow$aaa"].Replace("'", "''") + "%')";
        }
        if (!string.IsNullOrEmpty(Request.Form[cCol.ColumnName + "_SearchShow$bbb"]))
        {
            sql += " and (content like '%" + Request.Form[cCol.ColumnName+"_SearchShow$aaa"].Replace("'", "''") + "%')";
        }

        return sql;
    }

    #endregion
}
